package com.shop.api.feign;

import com.shop.Result.LdbzResult;
import com.shop.pojo.LdbzAdminUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "shop-service-admin")
public interface AdminUserFeign {

    //修改页面跳转
    @RequestMapping(value = "/admin/user/service/editAdminUser/{id}",method = RequestMethod.GET)
    LdbzResult editAdminUser(@RequestParam("id")long id);

    //分页获取后台管理用户
    @RequestMapping(value = "/admin/user/service/getAdminUserPage",method = RequestMethod.GET)
    LdbzResult getAdminUserPage(@RequestParam("entity")LdbzAdminUser entity,@RequestParam("page")int page,@RequestParam("limit")int limit);

    //获取后台管理用户的详细信息
    @RequestMapping(value = "/admin/user/service/selectByKey/{id}",method = RequestMethod.GET)
    LdbzResult selectByKey(@RequestParam("id")long id);

    //删除后台管理用户
    @RequestMapping(value = "/admin/user/service/deleteByKey/{id}",method = RequestMethod.GET)
    LdbzResult deleteByKey(@RequestParam("id")String id);

    //新增用户
    @RequestMapping(value = "/admin/user/service/insertByKey",method = RequestMethod.GET)
    LdbzResult insertByKey(@RequestParam("entity")LdbzAdminUser entity);

    //修改用户
    @RequestMapping(value = "/admin/user/service/updateByKey",method = RequestMethod.GET)
    LdbzResult updateByKey(@RequestParam("entity")LdbzAdminUser entity);

    @RequestMapping(value = "/admin/user/service/countAdminUser",method = RequestMethod.GET)
    LdbzResult countAdminUser(@RequestParam("entity")LdbzAdminUser entity);
}
